package com.bright.springboot;

import com.bright.springboot.config.AppConfiguration;
import com.bright.springboot.config.HsfConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Bright·SZ(zhanming.szm@alibaba-inc.com)
 * @Date 2019/7/16
 * @Description
 **/
@RestController
@SpringBootApplication
public class ConfigurationApplication {

    @Autowired
    private HsfConfiguration hsfConfiguration;

    @Autowired
    private AppConfiguration appConfiguration;

    @RequestMapping("/")
    public String index(){
        return "hsf version = "+ hsfConfiguration.getVersion() + " app version = "+ appConfiguration.getVersion();
    }

    public static void main(String[] args) {
        SpringApplication.run(ConfigurationApplication.class,args);
    }
}
